import { lazy } from "react";
import { createBrowserRouter } from "react-router";
import HomePage from "../pages/Home";
import BaseLayout from "../layout/BaseLayout";

const AboutPage = lazy(() => import("../pages/About"));

export const router = createBrowserRouter([
  {
    path: "/",
    element: <BaseLayout />,
    children: [
      {
        index: true,
        element: <HomePage />,
      },
      {
        path: "about",
        element: <AboutPage />,
      },
    ],
  },
]);
